package com.fsnbigdata.service.api;
import com.fsnbigdata.domain.Ecosystem;
import com.fsnbigdata.domain.Organism;
import com.fsnbigdata.domain.dto.NamingPair;
import com.querydsl.core.types.Predicate;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import io.springlets.data.domain.GlobalSearch;
import io.springlets.format.EntityResolver;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * = EcosystemService
 *
 * TODO Auto-generated class documentation
 *
 */
@RooService(entity = Ecosystem.class)
public interface EcosystemService extends EntityResolver<Ecosystem, Long> {

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Ecosystem
     */
    public abstract Ecosystem findOne(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ecosystem
     */
    public abstract void delete(Ecosystem ecosystem);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entities
     * @return List
     */
    public abstract List<Ecosystem> save(Iterable<Ecosystem> entities);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     */
    public abstract void delete(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return Ecosystem
     */
    public abstract Ecosystem save(Ecosystem entity);

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Ecosystem
     */
    public abstract Ecosystem findOneForUpdate(Long id);

    /**
     *
     * @param predicate
     * @param pageable
     * @return
     */
    public abstract Page<Ecosystem> search(Predicate predicate, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public abstract List<Ecosystem> findAll(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @return List
     */
    public abstract List<Ecosystem> findAll();

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public abstract long count();


    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Ecosystem> findAll(GlobalSearch globalSearch, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Ecosystem> findAll(GlobalSearch globalSearch, Pageable pageable, String creator);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Ecosystem> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);

    List<NamingPair> findAllByInitial(String initial);

    List<List<Ecosystem>> findByType();

    Page<Ecosystem> findByPageAndSize(Integer type,String creator,String create_date,String approver,String name, Pageable pageable);//分页查询

    List queryByKey(String name, String administrativeLocation, String currentLevel, String createDate, String administrativeDepartment, String type, Pageable pageable1);
}
